package com.ele.client.words;

import com.ele.client.lessons.*;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.DataGrid;
import com.github.gwtbootstrap.client.ui.Pagination;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class ListView extends Composite implements ListPresenter.Display {

    interface DefaultUiBinder extends UiBinder<Widget, ListView> {}
    private static DefaultUiBinder uiBinder = GWT.create(DefaultUiBinder.class);

    @UiField
    Pagination dataGridPagination;
    @UiField
    DataGrid dataGrid;
    @UiField
    Button addButton;
    @UiField
    Button deleteButton;
    @UiField
    Button attachToSectionButton;

    public ListView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public Pagination getDataGridPagination() {
        return dataGridPagination;
    }

    @Override
    public DataGrid getDataGrid() {
        return dataGrid;
    }

    @Override
    public Button getAddButton() {
        return addButton;
    }

    @Override
    public Button getDeleteButton() {
        return deleteButton;
    }

    @Override
    public Button getAttachToSectionButton() {
        return attachToSectionButton;
    }
}
